<!--绍主体内容-->
<div class="join_img"></div>
<div class="clear"></div>
<div class="index_zxjm">
    <div class="w1200">
        <div class="jm_img"></div>
        <a name="apply_01"></a>
        <div class="jm_form">

            <ul>
                <li><input name="name" type="text"  value="请输入姓名"></li>
                <li><input name="age" type="text"  value="请输入年龄"></li>
                <li><input name="investment" type="text"  value="计划投资资金（万元）"></li>
                <li><input name="mobile" type="text"  value="请输入手机号"></li>
                <li><input type="text" class="yzm" value="请输入验证码"><button class="yzm_btn">获取验证码</button></li>
                <li><button class="submit">提交申请</button></li>
            </ul>
        </div>

        <script type="text/javascript">
            var times = 120;
            var isinerval;
            $('.yzm_btn').click(function(){
                var mobile = '18070929402';
                $.ajax({
                    url:'api.php?op=new_sms&mobile=' + mobile,
                    type:'get',
                    dataType:'json',
                    success:function (data) {
                        if(data=="0") {
                            times = 120;
                            $(".yzm_btn").attr("disabled", true);
                            isinerval = setInterval("CountDown()", 1000);
                        } else {
                            alert("短信发送失败");
                        }
                    }
                });
            });
            function CountDown() {
                if (times < 1) {
                    $(".yzm_btn").html("获取短信校验码").attr("disabled", false);
                    clearInterval(isinerval);
                    return;
                }
                $(".yzm_btn").html(times+" 秒后重获校验码");
                times--;
            }
            $('.jm_form ul li input').focus(function () {
                var val = $(this).val();
                if(val == "请输入姓名" || val == "请输入年龄" || val == "请输入手机号" || val == "请输入验证码" || val == "计划投资资金（万元）"){
                    $(this).val('');
                }
            })

            $(".submit").click(function () {
                var name = $(".jm_form ul li input[name='name']").val();
                var age = $(".jm_form ul li input[name='age']").val();
                var investment = $(".jm_form ul li input[name='investment']").val();
                var mobile = $(".jm_form ul li input[name='mobile']").val();
                var verifyCode = $(".yzm").val();
                $.ajax({
                    url:'api.php?op=join',
                    type:'post',
                    data:{
                        'name':name,
                        'age':age,
                        'investment':investment,
                        'mobile':mobile,
                        'verifyCode':verifyCode
                    },
                    dataType:'JSON',
                    success:function (e) {
                        if(e == 0){
                            alert('申请成功!');
                            location.reload();
                        }else{
                            alert(e);
                        }
                    }
                })
            })
        </script>

    </div>
</div>

<footer>
    <h3>联系我们</h3>
    <ul class="w1200">
        <li><i class="tel"></i><p>联系电话：0771-2798570 / 15177102831</p></li>
        <li><i class="email"></i><p>邮箱：xianghai_jituan@163.com</p></li>
        <li><i class="weibo"></i><p>微博：U家live</p></li>
        <li><i class="weixin"></i><p>微信客服号：xiaoujsh</p></li>
        <li><i class="location"></i><p>公司地址：广西壮族自治区南宁市青秀区民族大道127号铂宫国际写字楼12层</p></li>
    </ul>
    <div class="w1200">
        <div class="weixin_pic">
            <img src="{IMG_PATH}market_img/weixin_ujsh.png" />
            <br/>
            <p>
                微信扫一扫关注<br/>
                或搜索关注：U家生活App
            </p>
        </div>
        <div class="weixin_pic" style="margin-left:146px;">
            <img src="{IMG_PATH}market_img/wx_dxe.png" />
            <br/>
            <p>
                微信扫一扫关注<br/>
                或搜索关注：U家店小二
            </p>
        </div>
    </div>
    <div class="clear"></div>
    <div class="copyright">
        Copyright Reserved 2014-2015 ©U家超市|经营许可证编号：桂B2-20160064 桂ICP备16005646号-1
    </div>
</footer>

</body>
</html>